//
//  LOLMainTabBarController.m
//  LOLer
//
//  Created by kaijie on 16/3/29.
//  Copyright © 2016年 kaijie. All rights reserved.
//

#import "LOLMainTabBarController.h"
#import "LOLFindViewController.h"
#import "LOLFriendViewController.h"
#import "LOLMeViewController.h"
#import "LOLInformationViewController.h"

@interface LOLMainTabBarController ()

@end

@implementation LOLMainTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.viewControllers=[self setViewControllers];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(NSArray*)setViewControllers{
    NSMutableArray*array=[NSMutableArray new];
    [array addObject:[self UpInformationViewController]];
    [array addObject:[self UpFriendViewController]];
    [array addObject:[self UpFindViewController]];
    [array addObject:[self UpMeViewController]];
    
    return array;
}
-(UINavigationController*)UpFindViewController{
    LOLFindViewController*view=[LOLFindViewController new];
    
    view.tabBarItem.title=@"发现";
    view.tabBarItem.image=[UIImage imageNamed:@"tab_icon_quiz_normal"];
    view.tabBarItem.selectedImage=[UIImage imageNamed:@"tab_icon_quiz_press"];
    LOLNavigationController*navi=[[LOLNavigationController alloc]initWithRootViewController:view];
    
    
    return navi;
}
-(UINavigationController*)UpFriendViewController{
    LOLFriendViewController*view=[LOLFriendViewController new];
    view.tabBarItem.title=@"好友";
    view.tabBarItem.image=[UIImage imageNamed:@"tab_icon_friend_normal"];
    view.tabBarItem.selectedImage=[UIImage imageNamed:@"tab_icon_friend_press"];
    LOLNavigationController*navi=[[LOLNavigationController alloc]initWithRootViewController:view];

    return navi;
}
-(UINavigationController*)UpInformationViewController{
    LOLInformationViewController*view=[LOLInformationViewController new];
    view.tabBarItem.title=@"资讯";
    view.tabBarItem.image=[UIImage imageNamed:@"tab_icon_news_normal"];
    view.tabBarItem.selectedImage=[UIImage imageNamed:@"tab_icon_news_press"];
    LOLNavigationController*navi=[[LOLNavigationController alloc]initWithRootViewController:view];
    navi.navigationBar.backgroundColor=[UIColor whiteColor];
    
    
    return navi;
}
-(UINavigationController*)UpMeViewController{
    LOLMeViewController*view=[LOLMeViewController new];
    view.tabBarItem.title=@"我";
    view.tabBarItem.image=[UIImage imageNamed:@"tab_icon_news_normal"];
    view.tabBarItem.selectedImage=[UIImage imageNamed:@"tab_icon_news_press"];
    LOLNavigationController*navi=[[LOLNavigationController alloc]initWithRootViewController:view];
    return navi;
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
